package club.looli.haoke.api.graphql;

import graphql.schema.DataFetchingEnvironment;

/**
 * <p>
 * Created by looli on 2020/7/11
 * </p>
 *
 * <p>
 * DataFetcher 统一接口
 * </p>
 *
 * @author looli
 * @since 2020/7/11
 */
public interface MyDataFetcher {
    /**
     * 查询名称
     *
     * @return
     */
    String fieldName();
    /**
     * 具体实现数据查询的逻辑
     *
     * @param environment
     * @return
     */
    Object dataFetcher(DataFetchingEnvironment environment);
}
